//
//  RecommendDataModel.m
//  AroundTheWorld
//
//  Created by IfelseGo on 16/5/15.
//  Copyright © 2016年 IfelseGo an. All rights reserved.
//

#import "RecommendDataModel.h"
#import "CheckinModel.h"
#import "SlideModel.h"
#import "SubjectModel.h"
#import "DiscountModel.h"
#import "Discount_SubjectModel.h"


@implementation RecommendDataModel

-(void)setValue:(id)value forUndefinedKey:(NSString *)key{
    
}



//重写setter方法
-(void)setSlide:(NSMutableArray *)slide{
    _slide = slide;
    NSMutableArray *array = [NSMutableArray array];
    for (NSDictionary *dic in _slide) {
        SlideModel *model = [[SlideModel alloc] init];
        [model setValuesForKeysWithDictionary:dic];
        [array addObject:model];
    }
    _slide = [NSMutableArray arrayWithArray:array];
}

//重写setter方法
-(void)setSubject:(NSMutableArray *)subject
{
    _subject= subject;
    NSMutableArray *array = [NSMutableArray array];
    for (NSDictionary *dic in _subject) {
        SubjectModel *model = [[SubjectModel  alloc] init];
        [model setValuesForKeysWithDictionary:dic];
        [array addObject:model];
    }
    _subject = [NSMutableArray arrayWithArray:array];
}

//重写setter方法
-(void)setDiscount:(NSMutableArray *)discount
{
    _discount =  discount;
    NSMutableArray *array = [NSMutableArray array];
    for (NSDictionary *dic in _discount) {
        DiscountModel *model = [[DiscountModel alloc] init];
        [model setValuesForKeysWithDictionary:dic];
        [array addObject:model];
    }
    _discount = [NSMutableArray arrayWithArray:array];
}
//重写setter方法
-(void)setDiscount_subject:(NSMutableArray *)discount_subject
{
    _discount_subject =  discount_subject;
    NSMutableArray *array = [NSMutableArray array];
    for (NSDictionary *dic in _discount_subject) {
        Discount_SubjectModel *model = [[Discount_SubjectModel alloc] init];
        [model setValuesForKeysWithDictionary:dic];
        [array addObject:model];
    }
    _discount_subject = [NSMutableArray arrayWithArray:array];
}

@end
